
import com.ktjy.cn.printer.Printer;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    //    //实战1
    @Test
    public void test() {
        //sz1
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Printer printer = (Printer) context.getBean("printer");
        printer.print("Hello World");
    }

}
